﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using WebHoiChoMuaBan.Controllers.Helpers;
using WebHoiChoMuaBan.Controllers.Global;

namespace WebHoiChoMuaBan.Controllers
{
    public class SearchController : Controller
    {
        public ActionResult SearchByProvince(int provinceId, int? page)
        {
            NewsProductHelper hNPro = new NewsProductHelper();
            if (page == null || page.Value <= 0)
                page = 1;
            ViewData["NewProducts"] = hNPro.searchByProvince(provinceId, page.Value, Config.ITEMS_PER_PAGE);
            return View();
        }

    }
}
